package com.hw.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @Classname: ConsumerOrderController
 * @Description: 描述
 * @Date: 2021/12/9
 * @Author: HuWei
 */
@RestController
@RequestMapping("/nacos/order")
public class ConsumerOrderController {

    @Resource
    private RestTemplate restTemplate;

    @Value("${server-url.nacos-user-server}")
    private String serverUrl;

    @GetMapping("/linkTest")
    public String linkTest(){
        return restTemplate.getForObject(serverUrl+"/nacos/payment/linkTest",String.class);
    }
}
